<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" scope="page" />
<!DOCTYPE html>
<html>
<head>
    <title>Insert title here</title>
    <link rel="stylesheet" href="${ctx}/css/templatemo_style.css" /> <!-- 页面整体布局样式定义 -->
    <link rel="stylesheet" href="${ctx}/css/ddsmoothmenu.css" /> <!-- 菜单样式定义 -->

    <script type="text/javascript" src="${ctx}/js/jquery-1.4.3.min.js"></script>
    <script type="text/javascript">
        var ctx = "${pageContext.request.contextPath}";

        function showUserName(){
            var name = "${user.username}";
            if(name != ""){
                $("#login").html(name);
                $("#exitP").show();
                $("#login").attr("href", ctx + "/user?flag=info&userId=${user.userid}");
            }else{
                $("#login").html("登录");
                $("#exitP").hide();
                $("#login").attr("href", ctx + "/user?flag=login");
            }
        }
    </script>
</head>

<body>
<div id="templatemo_body_wrapper">
    <div id="templatemo_wrapper">


        <!-- header -->
        <div id="templatemo_header">
            <div id="site_title"><h1><a href="">穿美在线鞋城</a></h1></div>
            <div id="header_right">
                <p>
                    <a href="" id="login">登录</a>&nbsp;
                    <span id="exitP" style="display: none"><a href="" id="exit">注销</a></span>
                </p>
            </div>
            <div class="cleaner"></div>
        </div>
        <!-- END of templatemo_header -->


        <!-- menu -->
        <div id="templatemo_menubar">
            <div id="top_nav" class="ddsmoothmenu">
                <ul>
                    <li><a href="${ctx}/home">首页</a></li>
                    <li><a href="${ctx}/pro?flag=product">产品</a></li>
                    <li><a href="${ctx}/ShoppingCartServlet">我的购物车</a></li>
                    <li><a href="${ctx}/OrderServlet?flag=qoi" class="selected">我的订单</a></li>
                </ul>
                <br style="clear: left" />
            </div>
            <!-- end of ddsmoothmenu -->
        </div>
        <!-- END of templatemo_menubar -->

        <%--订单详细信息展示区--%>
        <div id="templatemo_main">
            <div align="center">
                <span style="margin-left: 100px"><h3>订单详情</h3><br></span>
            </div>

            <br/>
            <div style="margin-left: 100px">
                <h4>订单</h4>
                &nbsp;&nbsp;&nbsp;&nbsp;订单号：${orderBo.orderId}<br/>
                &nbsp;&nbsp;&nbsp;&nbsp;创建时间：${orderBo.createTime}<br/>
                &nbsp;<h4>付款信息</h4>
                &nbsp;&nbsp;&nbsp;&nbsp;支付类型：${orderBo.payment}<br/>
                &nbsp;&nbsp;&nbsp;&nbsp;总价：${orderBo.amout}<br/>
                &nbsp;<h4>收货人信息</h4>
                &nbsp;&nbsp;&nbsp;&nbsp;收货人：${orderBo.receiver}<br/>
                &nbsp;&nbsp;&nbsp;&nbsp;省份：${orderBo.province}<br/>
                &nbsp;&nbsp;&nbsp;&nbsp;城市：${orderBo.city}<br/>
                &nbsp;&nbsp;&nbsp;&nbsp;区县：${orderBo.county}<br/>
                &nbsp;&nbsp;&nbsp;&nbsp;地址：${orderBo.address}<br/>
                &nbsp;&nbsp;&nbsp;&nbsp;邮政编码：${orderBo.zipcode}<br/>
                &nbsp;&nbsp;&nbsp;&nbsp;联系电话：${orderBo.telphone}<br/>
                <hr style="margin-left: -100px">
                <%--订单中的商品信息--%>
                <table border="0" cellspacing="0">
                    <tr align="center">
                        <td width="120"><b>商品编号</b></td>
                        <td width="300"><b>商品描述</b></td>
                        <td width="120"><b>数量</b></td>
                        <td width="120"><b>价格</b></td>
                        <td width="120"><b>小计</b></td>
                    </tr>

                    <c:forEach var="temp" items="${orderBo.shopInfo}">
                        <tr align="center">
                            <td><c:out value="${temp.produceId}"/></td>
                            <td><c:out value="${temp.descripyion}"/></td>
                            <td><c:out value="${temp.quantity}"/></td>
                            <td><c:out value="￥${temp.price}"/></td>
                            <td><c:out value="￥${temp.subtotal}"/></td>
                        </tr>
                    </c:forEach>
                    <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                    </tr>
                    <tr align="center">
                        <td></td>
                        <td></td>
                        <td></td>
                        <td><b>总金额</b></td>
                        <td>￥${orderBo.amout}</td>
                    </tr>
                </table>
            </div>
            <br/>
            <div align="center" style="margin-left: 100px">
                <span style=" margin-right: 100px" >
                    <a href="${ctx}/OrderServlet?flag=qoi">返回订单列表</a>
                </span>
            </div>
            <br/>
        </div>
        <%--订单详细信息展示区结束--%>

        <!-- footer -->
        <div id="templatemo_footer">
            <p>
                <a href="${ctx}/pro" >首页</a>&nbsp;&nbsp;&nbsp;
                <a href="${ctx}/pro?flag=product">产品</a>&nbsp;&nbsp;&nbsp;
                <a href="${ctx}/ShoppingCartServlet">我的购物车</a>&nbsp;&nbsp;&nbsp;
                <a href="${ctx}/OrderServlet?flag=qoi">我的订单</a>
            </p>
            版权所有 (c) 2018 <a href="javascript:void(0);">金桥软件</a>
        </div>
        <!-- END of templatemo_footer -->


    </div>
    <!-- END of templatemo_wrapper -->
</div>
<!-- END of templatemo_body_wrapper -->

<script type="text/javascript">
    $(function() {
        showUserName();
    });
</script>
</body>
</html>